function $(val){
	return document.getElementById(val);
}
function name(tag){
	return document.getElementsByName(tag);	
}
function selectTr(obj){
    var selectobj = eval(obj);
    selectobj.bgColor="#EEEEEE";        
}
function cancelTr(obj){
    var outsobj=eval(obj)
    outsobj.bgColor="#FFFFFF";
}
function returnAlert(message, actionUrl){
	var div = document.createElement("div");
	var divMsg = document.createElement("div");
	var divAlert = document.createElement("div");
	div.className = 'bottom';
	divMsg.className = 'alert';
	divAlert.className = 'alertUp';
	
	var text = document.createElement("div");
	text.innerHTML = message;
	var confirmButton = document.createElement("input");
	confirmButton.type="button";
	confirmButton.value = "确定";
	var textAlert = document.createElement("div");
	textAlert.innerHTML = "&nbsp;提示信息";
	var img = document.createElement("img");
	img.src="../imgs/delete.gif";
	var a = document.createElement("a");
	a.href = "#";
	confirmButton.onclick = function() {
		window.location.href = actionUrl;
	}
	a.onclick = function(){
		window.location.href = actionUrl;
	}
	divMsg.appendChild(text);
	divMsg.appendChild(confirmButton);
	divAlert.appendChild(textAlert);
	textAlert.appendChild(a);
	a.appendChild(img);
	document.body.appendChild(div);
	document.body.appendChild(divMsg);
	document.body.appendChild(divAlert);
	confirmButton.focus();
}

function deletes(divText,clickObj){
	var div = document.createElement("div");
	var divMsg = document.createElement("div");
	var divAlert = document.createElement("div");
	div.className = 'bottom';
	divMsg.className = 'alert';
	divAlert.className = 'alertUp';
	var textAlert = document.createElement("div");
	textAlert.innerHTML = "&nbsp;提示信息";
	var img = document.createElement("img");
	img.src="../imgs/delete.gif";
	var a = document.createElement("a");
	a.href = "#";
	var text = document.createElement("div");
	text.innerHTML = divText;
	var confirmButton = document.createElement("input");
	confirmButton.type="button";
	confirmButton.value = "确定";
	var cancelButton = document.createElement("input");
	cancelButton.type="button";
	cancelButton.value = "取消";
	confirmButton.onclick = function(){
		window.location.href = clickObj;
	};
	cancelButton.onclick = function() {
		document.body.removeChild(divMsg);
		document.body.removeChild(divAlert);
		document.body.removeChild(div);
	}
	a.onclick = function(){
		document.body.removeChild(divMsg);
		document.body.removeChild(div);
		document.body.removeChild(divAlert);
	}
	cancelButton.onblur = function() {
		this.focus();
	}
	divMsg.appendChild(text);
	divMsg.appendChild(cancelButton);
	divMsg.appendChild(confirmButton);
	divAlert.appendChild(textAlert);
	textAlert.appendChild(a);
	a.appendChild(img);
	document.body.appendChild(div);
	document.body.appendChild(divMsg);
	document.body.appendChild(divAlert);
	cancelButton.focus();
}
function deleteAlert(returnText){
	var div = document.createElement("div");
	var divMsg = document.createElement("div");
	var divAlert = document.createElement("div");
	div.className = 'bottom';
	divMsg.className = 'alert';
	divAlert.className = 'alertUp';
	var textAlert = document.createElement("div");
	textAlert.innerHTML = "&nbsp;提示信息";
	var img = document.createElement("img");
	img.border="0";
	img.src="../imgs/delete.gif";
	var a = document.createElement("a");
	a.href = "#";
	var text = document.createElement("div");
	text.innerHTML = returnText;
	var confirmButton = document.createElement("input");
	confirmButton.type="button";
	confirmButton.value = "确定";
	confirmButton.onclick = function() {
		document.body.removeChild(divMsg);
		document.body.removeChild(divAlert);
		document.body.removeChild(div);
	}
	a.onclick = function(){
		document.body.removeChild(divMsg);
		document.body.removeChild(div);
		document.body.removeChild(divAlert);
	}
	confirmButton.onblur = function() {
		this.focus();
	}
	divMsg.appendChild(text);
	divMsg.appendChild(confirmButton);
	divAlert.appendChild(textAlert);
	textAlert.appendChild(a);
	a.appendChild(img);
	document.body.appendChild(div);
	document.body.appendChild(divMsg);
	document.body.appendChild(divAlert);
	confirmButton.focus();
}